package org.rbreznak.tronco.sql;

import java.sql.ResultSet;
import java.sql.SQLException;

public class SQLVarchar implements SQLFormat{

	private ResultSet results;
	private String name;
	
	public String getValue() {
		try {
			return results.getString(name);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return "";
	}

	public SQLVarchar setFormat(String name) {
		this.name = name;
		return this;
	}

	public void setResults(ResultSet results) {
		this.results = results;
	}

	public String getKey() {
		return name;
	}
}
